﻿using System;

namespace Report.Api.Models.Tier
{
    /// <summary>
    /// 生产数据同步model
    /// </summary>
    public class ProduceSyncModel
    {
        /// <summary>
        /// 组织ID
        /// </summary>
        public string OrgId { get; set; }

        /// <summary>
        /// 生产时间
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 投入数量
        /// </summary>
        public decimal TotalInQty { get; set; }

        /// <summary>
        /// 产出数量
        /// </summary>
        public decimal TotalFinishQty { get; set; }

        /// <summary>
        /// 最后一道工序完成数量
        /// </summary>
        public decimal LastProcedureFinishQty { get; set; }

        /// <summary>
        /// OQC数量（入库数）
        /// </summary>
        public decimal OqcQty { get; set; }

        public decimal TargetPCSQty { get; set; }

        /// <summary>
        /// sap入库数(预留字段)
        /// </summary>
        public decimal SapInQty { get; set; }

        /// <summary>
        /// 计划量（目标产能）
        /// </summary>
        public decimal PlanTotalFinishQty { get; set; }

        /// <summary>
        /// 计划量（目标入库）
        /// </summary>
        public decimal PlanTotalWarehouseQty { get; set; }

        /// <summary>
        /// 入库数（来源：从WMS定时获取）
        /// </summary>
        public decimal TotalWarehouseQty { get; set; }

        /// <summary>
        /// 总不良数量
        /// </summary>
        public decimal TotalBadQty { get; set; }

        public decimal TotalInUserWorkHour { get; set; }

        public decimal TotalFinishUserWorkHour { get; set; }

        public decimal TotalTotalWorkHour { get; set; }

        /// <summary>
        /// 实际出勤人数(开工人数)
        /// </summary>
        public decimal TotalUserQty { get; set; }

        /// <summary>
        /// 实际工时=产出总工时+投入总工时
        /// </summary>
        public decimal TotalUserWorkHour { get; set; }

        /// <summary>
        /// 线体编号
        /// </summary>
        public string LineCode { get; set; } 

        /// <summary>
        /// 线体名称
        /// </summary>
        public string LineName { get; set; }

        /// <summary>
        /// 实际上班时间
        /// </summary>
        public decimal LineWorkHour { get; set; }

        /// <summary>
        /// 计划上班时间
        /// </summary>
        public decimal PlanTotalWorkHour { get; set; }

        /// <summary>
        /// 应出勤人数（HR）
        /// </summary>
        public decimal TotalPlanUserQty { get; set; }

        /// <summary>
        /// 计划顺延数量
        /// </summary>
        public decimal PlanDelayQty { get; set; }

        /// <summary>
        /// 实际出勤人数（HR打卡人数）
        /// </summary>
        public decimal PresentUserQty { get; set; }

        /// <summary>
        /// 请假人数
        /// </summary>
        public decimal LeaveUserQty { get; set; }

        /// <summary>
        /// 计划标准总工时=计划生产数量* (总装工时 + 包装工时 + 老化工时)，即目标工时
        /// </summary>
        public decimal PlanTotalTotalWorkHour { get; set; }

        /// <summary>
        /// 印刷标准工时=工单上同步SAP的印刷标准工时（单位为秒）
        /// </summary>
        public decimal OtherStandardTime { get; set; }

        /// <summary>
        /// 印刷标准总工时=产出站实际产能数量* 印刷标准工时
        /// </summary>
        public decimal OtherTotalWorkHour { get; set; }
 
        /// <summary>
        /// 投入出勤工时
        /// </summary>
        public decimal TotalInUserAttendHour { get; set; }

        /// <summary>
        /// 产出出勤工时
        /// </summary>
        public decimal TotalFinishUserAttendHour { get; set; }
    }
}
